import request from "@/utils/request";

export function getList(method, data) {
  if (method == "post") {
    return request({
      url: "/elder",
      method: method,
      data,
    });
  } else {
    return request({
      url: "/elder",
      method: method,
      params: data,
    });
  }
}
export function getOlder(method, data) {
  if (method == "post") {
    return request({
      url: "/elder",
      method: method,
      data,
    });
  } else {
    return request({
      url: "/elder",
      method: method,
      params: data,
    });
  }
}
export function getFamily(method, data) {
  if (method == "post") {
    return request({
      url: "/elderfamily",
      method: method,
      data,
    });
  } else {
    return request({
      url: "/elderfamily",
      method: method,
      params: data,
    });
  }
}
export function getHealth(method, data) {
  if (method == "post") {
    return request({
      url: "/elderhealth",
      method: method,
      data,
    });
  } else {
    return request({
      url: "/elderhealth",
      method: method,
      params: data,
    });
  }
}
export function getBedset(method, data) {
  if (method == "post") {
    return request({
      url: "/elderbedset",
      method: method,
      data,
    });
  } else {
    return request({
      url: "/elderbedset",
      method: method,
      params: data,
    });
  }
}
export function getFees(method, data) {
  if (method == "post") {
    return request({
      url: "/elderfees",
      method: method,
      data,
    });
  } else {
    return request({
      url: "/elderfees",
      method: method,
      params: data,
    });
  }
}
export function changeFormal(method, data) {
  if (method == "post") {
    return request({
      url: "/change/livestatus",
      method: method,
      data,
    });
  } else {
    return request({
      url: "/change/livestatus",
      method: method,
      params: data,
    });
  }
}
export function leave(method, data) {
  if (method == "post") {
    return request({
      url: "/elder/leave",
      method: method,
      data,
    });
  } else {
    return request({
      url: "/elder/leave",
      method: method,
      params: data,
    });
  }
}
export function feesDetail(method, data) {
  if (method == "post") {
    return request({
      url: "/fees",
      method: method,
      data,
    });
  } else {
    return request({
      url: "/fees",
      method: method,
      params: data,
    });
  }
}
export function cancelFees(method, data) {
  if (method == "post") {
    return request({
      url: "/fees/invalid",
      method: method,
      data,
    });
  } else {
    return request({
      url: "/fees/invalid",
      method: method,
      params: data,
    });
  }
}
export function billList(method, data) {
  if (method == "post") {
    return request({
      url: "/bill",
      method: method,
      data,
    });
  } else {
    return request({
      url: "/bill",
      method: method,
      params: data,
    });
  }
}
export function setNoBill(method, data) {
  if (method == "post") {
    return request({
      url: "/bill/invalid",
      method: method,
      data,
    });
  } else {
    return request({
      url: "/bill/invalid",
      method: method,
      params: data,
    });
  }
}
export function payBill(method, data) {
  if (method == "post") {
    return request({
      url: "/bill/giveback",
      method: method,
      data,
    });
  } else {
    return request({
      url: "/bill/giveback",
      method: method,
      params: data,
    });
  }
}
export function setRecover(method, data) {
  if (method == "post") {
    return request({
      url: "/bill/recover",
      method: method,
      data,
    });
  } else {
    return request({
      url: "/bill/recover",
      method: method,
      params: data,
    });
  }
}

export function feeslist(method, data) {
  if (method == "post") {
    return request({
      url: "/elder/feeslist",
      method: method,
      data,
    });
  } else {
    return request({
      url: "/elder/feeslist",
      method: method,
      params: data,
    });
  }
}
export function doorServeList(method, data) {
  if (method == "post") {
    return request({
      url: "/serviceelder",
      method: method,
      data,
    });
  } else {
    return request({
      url: "/serviceelder",
      method: method,
      params: data,
    });
  }
}
export function servicerList(method, data) {
  if (method == "post") {
    return request({
      url: "/servicer",
      method: method,
      data,
    });
  } else {
    return request({
      url: "/servicer",
      method: method,
      params: data,
    });
  }
}
export function assigElder(method, data) {
  if (method == "post") {
    return request({
      url: "/service/assign",
      method: method,
      data,
    });
  } else {
    return request({
      url: "/service/assign",
      method: method,
      params: data,
    });
  }
}
export function findAllBill(method, data) {
  if (method == "post") {
    return request({
      url: "/bill/list",
      method: method,
      data,
    });
  } else {
    return request({
      url: "/bill/list",
      method: method,
      params: data,
    });
  }
}
export function assignlist(method, data) {
  if (method == "post") {
    return request({
      url: "/service/assignlist",
      method: method,
      data,
    });
  } else {
    return request({
      url: "/service/assignlist",
      method: method,
      params: data,
    });
  }
}
export function servicerAssignlist(method, data) {
  if (method == "post") {
    return request({
      url: "/servicer/assignlist",
      method: method,
      data,
    });
  } else {
    return request({
      url: "/servicer/assignlist",
      method: method,
      params: data,
    });
  }
}
export function deleteAssignlist(method, data) {
  if (method == "post") {
    return request({
      url: "/service/assigndelete",
      method: method,
      data,
    });
  } else {
    return request({
      url: "/service/assigndelete",
      method: method,
      params: data,
    });
  }
}
